﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

namespace Zj.WpfView.Utility
{
    public class PostApi
    {
        private static string Url = "http://localhost:12345/api";
        public static async Task<string> PostRouteAsync(string controllerName, string actionName, string postDataStr)
        {
            HttpClient client = new HttpClient();
            HttpContent content = new StringContent(postDataStr, Encoding.UTF8, "application/json");
            return await client.PostAsync(Url, content).Result.Content.ReadAsStringAsync();
        }
    }
}
